| Author | Manuela Ruiz (mruiz@lcc.uma.es) |
Tool for painting a label
Activates the cursor
# File lib/interfaces/guitools.rb, line 160
160: def activate
161: file_name = Sketchup.find_support_file "add_label.png", "Plugins/ShaDe/#{Constants::ABS_ICONS_DIR}"
162: @id_cursor = UI.create_cursor file_name, 18, 18
163: end
Method that triggers when the left button of the mouse is pressed
# File lib/interfaces/guitools.rb, line 171
171: def onLButtonDown(flags, x, y, view)
172:
173: inputpoint = view.inputpoint x,y
174: point = inputpoint.position
175:
176: #Obtain point relative to shape
177: t = @shape.layout_transformation.inverse
178: pt_label = t * point
179: layer_name = Sketchup.active_model.active_layer.name
180: @shape.add_label(pt_label, @value, layer_name)
181:
182: @shape.changed = true
183:
184: Shade.project.refresh
185: Shade.project.execution.reset
186: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.